package com.jblapp.icu.sms;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import android.os.Handler;
import android.os.Message;
import android.util.Log;

import com.jblapp.icu.http.UniqId;
import com.jblapp.icu.ui.RegisterConfirmActivity;

public class GetUniqIdThread implements Runnable {
	private String UNIQID = null;
	private UniqId uniqId = null;
	private Handler msgHander = null;
	private String telNumber = null;
	private List<NameValuePair> params = null;
	private final static String TAG = "GetUniqIdThread";

	public GetUniqIdThread(Handler msgHander, String telNumber) {
		this.msgHander = msgHander;
		this.telNumber = telNumber;
	}

	@Override
	public void run() {
//		params = new ArrayList<NameValuePair>();
//		params.add(new BasicNameValuePair("mobilephone", telNumber));
//		uniqId = new UniqId(params);
		Message msg = new Message();
		try {
//			UNIQID = uniqId.getUnitId();
			UNIQID = new Date().getTime()+"";
			Log.e(TAG, UNIQID);
			msg.what = RegisterConfirmActivity.SEND_SMS;
			msg.obj = UNIQID;
			msgHander.sendMessage(msg);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
